package com.myk.game.gobangchess.ai.gravityfour;

public class Main {

    public static void main(String[] args) {
        // Sample input
        int[][] board = {            {0, -1, -1, 1, 1, -1},
                                    {0, -1, 1, 1, 0, 0},
                                    {0, 1, 0, 0, 0, 0},
                                    {0, 0, 0, 0, 0, 0},
                                    {0, 0, 0, 0, 0, 0},
                                    {0, 0, 0, 0, 0, 0}};

        int direction = 9;
        int turn = 1;
        int x = 7; //7：向下    8：向左    9：向上，   10：向右
        int dir_changed = 0;

        Object[] result = PointSetting.pointSetting(board, direction, turn, x, dir_changed);
        int set_succ = (int) result[0];
        int[][] new_board = (int[][]) result[1];
        int new_direction = (int) result[2];
        int new_dir_changed = (int) result[3];

        System.out.println("set_succ: " + set_succ);

        System.out.println("new_board: ");
        for (int i = 0; i < new_board.length; i++) {
            for (int j = 0; j < new_board[0].length; j++) {
                System.out.print(new_board[i][j] + " ");
            }
            System.out.println();
        }
        System.out.println("new_direction: " + new_direction);
        System.out.println("new_dir_changed: " + new_dir_changed);

    }
}
